﻿using LdtDataEngin.ModuleDetail.RegCommon.SourceDataAnalysis;
using System;
using System.Collections.Generic;
using System.Text;

namespace LdtDataEngin.ModuleDetail.RegCommon
{
    ///<summary>
    /// 类名称  : ProcessCompose
    /// 功能    : 对分析流程进行组合返回
    /// 更新人  : ljx 
    ///</summary> 
    public class ProcessCompose
    {

        /// <summary>
        /// 返回操作实例
        /// </summary>
        /// <param name="selectType">操作类型1段落2案件要素3案由</param>
        /// <returns></returns>
        public static IExtractSource GetExtractSource(int selectType)
        {
            switch (selectType)
            {
                case 1:
                    return new SourceDataAnalysis.ExtractSourceParagraph();
                case 2:
                    return new SourceDataAnalysis.ExtractSourceElement();
                default:
                    throw new NotSupportedException("无法找到对应的实例！");
            }

        }


        /// <summary>
        /// 返回操作实例
        /// </summary>
        /// <param name="CMode">操作类型0字典1函数</param>
        /// <param name="ccid">案由ID</param>
        /// <returns></returns>
        public static ConvertModeAnalysis.IConvertAnalysis GetConvertModel(int CMode,string ccid)
        {
            switch (CMode)
            {
                case 0:
                    return new ConvertModeAnalysis.ConvertATCode() {ccid=ccid };
                case 1:
                    return new ConvertModeAnalysis.FunctionConvert() { ccid = ccid };
                default:
                    return new ConvertModeAnalysis.FunctionConvert() { ccid = ccid };
            }

        }


    }
}
